package com.choupin.choupin.entity;

import java.util.Date;
import java.util.Objects;

public class Mine {
    private Integer id; //用户表
    private String phone ;//手机号，可用登入账号
    private Integer age;
    private String password ;//密码
    private String nickname; //昵称
    private Integer gender; //性别，0男或1女
    private Date birthday; //出生日期
    private String avatar; // 头像
    private Integer  weight; //中奖概率
    private String icon;//会员图标

    public Mine() {
    }

    public Mine(Integer id, String phone, Integer age, String password, String nickname, Integer gender, Date birthday, String avatar, Integer weight, String icon) {
        this.id = id;
        this.phone = phone;
        this.age = age;
        this.password = password;
        this.nickname = nickname;
        this.gender = gender;
        this.birthday = birthday;
        this.avatar = avatar;
        this.weight = weight;
        this.icon = icon;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public Integer getWeight() {
        return weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Mine mine = (Mine) o;
        return Objects.equals(id, mine.id) &&
                Objects.equals(phone, mine.phone) &&
                Objects.equals(age, mine.age) &&
                Objects.equals(password, mine.password) &&
                Objects.equals(nickname, mine.nickname) &&
                Objects.equals(gender, mine.gender) &&
                Objects.equals(birthday, mine.birthday) &&
                Objects.equals(avatar, mine.avatar) &&
                Objects.equals(weight, mine.weight) &&
                Objects.equals(icon, mine.icon);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, phone, age, password, nickname, gender, birthday, avatar, weight, icon);
    }

    @Override
    public String toString() {
        return "Mine{" +
                "id=" + id +
                ", phone='" + phone + '\'' +
                ", age=" + age +
                ", password='" + password + '\'' +
                ", nickname='" + nickname + '\'' +
                ", gender=" + gender +
                ", birthday=" + birthday +
                ", avatar='" + avatar + '\'' +
                ", weight=" + weight +
                ", icon='" + icon + '\'' +
                '}';
    }
}
